<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>富文本编辑器</title>
    <link rel="icon" th:href="@{/images/favicon.ico}">
    <link rel="stylesheet" th:href="@{/layuimini/lib/layui-v2.6.3/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/layuimini/css/public.css}" media="all">
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="ok-body">
            <blockquote class="layui-elem-quote" style="padding: 5px;">
                1.layui第三方扩展组件：<font color="red" size="2">富文本编辑器(tinymce)</font>；
                <a href="https://gitee.com/chick1993/layui-tinymce" target="_blank" class="layui-btn layui-btn-sm layui-btn-danger">tinymce</a><br>
                2.本项目暂时未用到该组件；
            </blockquote>
            <pre>
            // Step1. 引入依赖
            let tinymce = layui.tinymce;
            <br/>
            // Step2. 使用
            tinymce.render({
                elem: "#edit",
                height: 200
            });
		    </pre>

            <textarea name="" id="edit">这里是<span style="color: #e03e2d;"><em>edit2初始化</em></span>的内容</textarea>
        </div>
    </div>
</div>
<!--  引入layui框架js文件-->
<script th:src="@{/layuimini/lib/layui-v2.6.3/layui.js}" charset="utf-8"></script>
<script th:src="@{/layuimini/js/lay-config.js?v=1.0.4}" charset="UTF-8"></script>
<script type="text/javascript" th:inline="javascript">
    layui.use(["code", "tinymce"], function () {
        let code = layui.code;
        let tinymce = layui.tinymce;
        let $ = layui.jquery;

        code({
            elem: "pre",
            title: "代码示例",
            encoded: true,
            skin:'notepad', //设置显示风格
            about: false
        });

        tinymce.render({
            elem: "#edit",
            height: 200
        });
    });
</script>
</body>
</html>
